aux_source_directory(. DIR_SRC)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -O2")

include_directories(/usr/local/include)

add_executable(gm3d ${DIR_SRC})

find_library(GCTL_LIBRARY gctl /usr/local/lib)
target_link_libraries(gm3d ${GCTL_LIBRARY})

# 安装至${CMAKE_INSTALL_PREFIX}/sbin文件夹
install(TARGETS gm3d RUNTIME DESTINATION sbin)